Optimal. Leaf size=666 \[ -\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-6 c^2 e^2 \left (a^2 b e^2 (d g+5 e f)-2 a^3 e^3 g-6 a b^2 d^2 e g+2 b^3 d^3 g\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (d g+5 e f)+b^2 d^2 (4 d g+5 e f)\right )+10 a b^3 c e^4 (e f-d g)+2 c^4 d^3 (2 a e (10 e f-d g)-3 b d (d g+5 e f))+b^5 \left (-e^4\right ) (e f-d g)+12 c^5 d^5 f\right )}{\left (b^2-4 a c\right )^{5/2} \left (a e^2-b d e+c d^2\right )^3}-\frac{c x \left (3 c e (b d-2 a e) (2 a e g-b (d g+e f)+2 c d f)-(2 c d-b e) \left (c (2 a e (4 e f-d g)-3 b d (d g+e f))-2 b^2 e (e f-d g)+6 c^2 d^2 f\right )\right )-\left (2 a c e+b^2 (-e)+b c d\right ) \left (c (2 a e (4 e f-d g)-3 b d (d g+e f))-2 b^2 e (e f-d g)+6 c^2 d^2 f\right )+3 a c e (2 c d-b e) (2 a e g-b (d g+e f)+2 c d f)}{2 \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right ) \left (a e^2-b d e+c d^2\right )^2}-\frac{c x (2 a e g-b (d g+e f)+2 c d f)+a b e g-2 a c d g+2 a c e f+b^2 (-e) f+b c d f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2 \left (a e^2-b d e+c d^2\right )}-\frac{e^4 (e f-d g) \log \left (a+b x+c x^2\right )}{2 \left (a e^2-b d e+c d^2\right )^3}+\frac{e^4 (e f-d g) \log (d+e x)}{\left (a e^2-b d e+c d^2\right )^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 2.55086, antiderivative size = 664, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.24, Rules used = {822, 800, 634, 618, 206, 628} \[ -\frac{\tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right ) \left (-6 c^2 e^2 \left (a^2 b e^2 (d g+5 e f)-2 a^3 e^3 g-6 a b^2 d^2 e g+2 b^3 d^3 g\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (d g+5 e f)+b^2 d^2 (4 d g+5 e f)\right )+10 a b^3 c e^4 (e f-d g)+2 c^4 d^3 (2 a e (10 e f-d g)-3 b d (d g+5 e f))+b^5 \left (-e^4\right ) (e f-d g)+12 c^5 d^5 f\right )}{\left (b^2-4 a c\right )^{5/2} \left (a e^2-b d e+c d^2\right )^3}-\frac{c x \left (3 c e (b d-2 a e) (2 a e g-b (d g+e f)+2 c d f)-(2 c d-b e) \left (2 a c e (4 e f-d g)-2 b^2 e (e f-d g)-3 b c d (d g+e f)+6 c^2 d^2 f\right )\right )-\left (2 a c e+b^2 (-e)+b c d\right ) \left (2 a c e (4 e f-d g)-2 b^2 e (e f-d g)-3 b c d (d g+e f)+6 c^2 d^2 f\right )+3 a c e (2 c d-b e) (2 a e g-b (d g+e f)+2 c d f)}{2 \left (b^2-4 a c\right )^2 \left (a+b x+c x^2\right ) \left (a e^2-b d e+c d^2\right )^2}-\frac{c x (2 a e g-b (d g+e f)+2 c d f)+a b e g-2 a c d g+2 a c e f+b^2 (-e) f+b c d f}{2 \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )^2 \left (a e^2-b d e+c d^2\right )}-\frac{e^4 (e f-d g) \log \left (a+b x+c x^2\right )}{2 \left (a e^2-b d e+c d^2\right )^3}+\frac{e^4 (e f-d g) \log (d+e x)}{\left (a e^2-b d e+c d^2\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 822
Rule 800
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{f+g x}{(d+e x) \left (a+b x+c x^2\right )^3} \, dx &=-\frac{b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac{\int \frac{6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)+3 c e (2 c d f+2 a e g-b (e f+d g)) x}{(d+e x) \left (a+b x+c x^2\right )^2} \, dx}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right )}\\ &=-\frac{b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac{3 a c e (2 c d-b e) (2 c d f+2 a e g-b (e f+d g))-\left (b c d-b^2 e+2 a c e\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )+c \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2 \left (a+b x+c x^2\right )}+\frac{\int \frac{-3 c d e \left (b c d-b^2 e+2 a c e\right ) (2 c d f+2 a e g-b (e f+d g))+\left (2 c^2 d^2-b^2 e^2-c e (b d-4 a e)\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )-c e \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{(d+e x) \left (a+b x+c x^2\right )} \, dx}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2}\\ &=-\frac{b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac{3 a c e (2 c d-b e) (2 c d f+2 a e g-b (e f+d g))-\left (b c d-b^2 e+2 a c e\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )+c \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2 \left (a+b x+c x^2\right )}+\frac{\int \left (\frac{2 \left (b^2-4 a c\right )^2 e^5 (e f-d g)}{\left (c d^2-b d e+a e^2\right ) (d+e x)}+\frac{2 \left (6 c^5 d^5 f-b^5 e^4 (e f-d g)+9 a b^3 c e^4 (e f-d g)-c^2 e^2 \left (6 b^3 d^3 g-18 a b^2 d^2 e g-6 a^3 e^3 g+a^2 b e^2 (23 e f-5 d g)\right )+c^4 d^3 (2 a e (10 e f-d g)-3 b d (5 e f+d g))+2 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (5 e f+d g)+b^2 d^2 (5 e f+4 d g)\right )-c \left (b^2-4 a c\right )^2 e^4 (e f-d g) x\right )}{\left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )}\right ) \, dx}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2}\\ &=-\frac{b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac{3 a c e (2 c d-b e) (2 c d f+2 a e g-b (e f+d g))-\left (b c d-b^2 e+2 a c e\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )+c \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2 \left (a+b x+c x^2\right )}+\frac{e^4 (e f-d g) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}+\frac{\int \frac{6 c^5 d^5 f-b^5 e^4 (e f-d g)+9 a b^3 c e^4 (e f-d g)-c^2 e^2 \left (6 b^3 d^3 g-18 a b^2 d^2 e g-6 a^3 e^3 g+a^2 b e^2 (23 e f-5 d g)\right )+c^4 d^3 (2 a e (10 e f-d g)-3 b d (5 e f+d g))+2 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (5 e f+d g)+b^2 d^2 (5 e f+4 d g)\right )-c \left (b^2-4 a c\right )^2 e^4 (e f-d g) x}{a+b x+c x^2} \, dx}{\left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^3}\\ &=-\frac{b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac{3 a c e (2 c d-b e) (2 c d f+2 a e g-b (e f+d g))-\left (b c d-b^2 e+2 a c e\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )+c \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2 \left (a+b x+c x^2\right )}+\frac{e^4 (e f-d g) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}-\frac{\left (e^4 (e f-d g)\right ) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 \left (c d^2-b d e+a e^2\right )^3}+\frac{\left (12 c^5 d^5 f-b^5 e^4 (e f-d g)+10 a b^3 c e^4 (e f-d g)+2 c^4 d^3 (2 a e (10 e f-d g)-3 b d (5 e f+d g))-6 c^2 e^2 \left (2 b^3 d^3 g-6 a b^2 d^2 e g-2 a^3 e^3 g+a^2 b e^2 (5 e f+d g)\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (5 e f+d g)+b^2 d^2 (5 e f+4 d g)\right )\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^3}\\ &=-\frac{b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac{3 a c e (2 c d-b e) (2 c d f+2 a e g-b (e f+d g))-\left (b c d-b^2 e+2 a c e\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )+c \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2 \left (a+b x+c x^2\right )}+\frac{e^4 (e f-d g) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}-\frac{e^4 (e f-d g) \log \left (a+b x+c x^2\right )}{2 \left (c d^2-b d e+a e^2\right )^3}-\frac{\left (12 c^5 d^5 f-b^5 e^4 (e f-d g)+10 a b^3 c e^4 (e f-d g)+2 c^4 d^3 (2 a e (10 e f-d g)-3 b d (5 e f+d g))-6 c^2 e^2 \left (2 b^3 d^3 g-6 a b^2 d^2 e g-2 a^3 e^3 g+a^2 b e^2 (5 e f+d g)\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (5 e f+d g)+b^2 d^2 (5 e f+4 d g)\right )\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{\left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^3}\\ &=-\frac{b c d f-b^2 e f+2 a c e f-2 a c d g+a b e g+c (2 c d f+2 a e g-b (e f+d g)) x}{2 \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \left (a+b x+c x^2\right )^2}-\frac{3 a c e (2 c d-b e) (2 c d f+2 a e g-b (e f+d g))-\left (b c d-b^2 e+2 a c e\right ) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )+c \left (3 c e (b d-2 a e) (2 c d f+2 a e g-b (e f+d g))-(2 c d-b e) \left (6 c^2 d^2 f-2 b^2 e (e f-d g)+2 a c e (4 e f-d g)-3 b c d (e f+d g)\right )\right ) x}{2 \left (b^2-4 a c\right )^2 \left (c d^2-b d e+a e^2\right )^2 \left (a+b x+c x^2\right )}-\frac{\left (12 c^5 d^5 f-b^5 e^4 (e f-d g)+10 a b^3 c e^4 (e f-d g)+2 c^4 d^3 (2 a e (10 e f-d g)-3 b d (5 e f+d g))-6 c^2 e^2 \left (2 b^3 d^3 g-6 a b^2 d^2 e g-2 a^3 e^3 g+a^2 b e^2 (5 e f+d g)\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (5 e f+d g)+b^2 d^2 (5 e f+4 d g)\right )\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{\left (b^2-4 a c\right )^{5/2} \left (c d^2-b d e+a e^2\right )^3}+\frac{e^4 (e f-d g) \log (d+e x)}{\left (c d^2-b d e+a e^2\right )^3}-\frac{e^4 (e f-d g) \log \left (a+b x+c x^2\right )}{2 \left (c d^2-b d e+a e^2\right )^3}\\ \end{align*}
Mathematica [A] time = 3.57337, size = 668, normalized size = 1. \[ \frac{1}{2} \left (\frac{2 b c \left (3 a^2 e^3 g-a c e \left (d^2 g-7 d e f+5 d e g x+7 e^2 f x\right )+3 c^2 d^2 (d f-d g x-3 e f x)\right )-4 c^2 \left (a^2 e^2 (4 d g-4 e f-3 e g x)+a c d e x (d g-7 e f)-3 c^2 d^3 f x\right )+b^2 c \left (3 a e^2 (d g-5 e f)+c d \left (-3 d^2 g-9 d e f+10 d e g x+2 e^2 f x\right )\right )+b^3 c e \left (5 d^2 g+d e (f-2 g x)+2 e^2 f x\right )+2 b^4 e^2 (e f-d g)}{\left (b^2-4 a c\right )^2 (a+x (b+c x)) \left (e (a e-b d)+c d^2\right )^2}-\frac{2 \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right ) \left (6 c^2 e^2 \left (-a^2 b e^2 (d g+5 e f)+2 a^3 e^3 g+6 a b^2 d^2 e g-2 b^3 d^3 g\right )+4 c^3 d e \left (3 a^2 e^2 (5 e f-2 d g)-3 a b d e (d g+5 e f)+b^2 d^2 (4 d g+5 e f)\right )+10 a b^3 c e^4 (e f-d g)-2 c^4 d^3 (2 a e (d g-10 e f)+3 b d (d g+5 e f))+b^5 e^4 (d g-e f)+12 c^5 d^5 f\right )}{\left (4 a c-b^2\right )^{5/2} \left (e (b d-a e)-c d^2\right )^3}+\frac{b (a e g+c d (f-g x)-c e f x)+2 c (-a d g+a e (f+g x)+c d f x)+b^2 (-e) f}{\left (b^2-4 a c\right ) (a+x (b+c x))^2 \left (e (b d-a e)-c d^2\right )}+\frac{2 e^4 (e f-d g) \log (d+e x)}{\left (e (a e-b d)+c d^2\right )^3}+\frac{e^4 (d g-e f) \log (a+x (b+c x))}{\left (e (a e-b d)+c d^2\right )^3}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.034, size = 9360, normalized size = 14.1 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.24608, size = 3089, normalized size = 4.64 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]